<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>余额记录</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/style.css"/>
		<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
		<link rel="stylesheet" href="__INDEX__/css/mall.css" />
	</head>
<style>
   .mui-bar-nav,.gerzl_btn a{
    	background-color: #01aaed;
	}
	body,.mui-content{
		background: #FFFFFF;
	}
</style>
	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class=" mui-icon mui-icon-left-nav mui-pull-left" href="JavaScript:history.go(-1)"></a>
		    <h1 class="mui-title">余额记录</h1>
		</header>
		<div class="mui-content record_content">  
		    <ul class="record_list2" id="sj_score">
 
		    </ul>  
			<input type="hidden" id="page" value="1" />
		    <div class="gerzl_btn gerzl_btn2" id="btn"><a href="{:url('member/tixian')}">余额提现</a></div>
		</div>
	</body>
</html>
{include file="public/footer" /}
<script type="text/javascript" src="__INDEX__/js/menudown.js" ></script>
<script>
	$(function(){
		$.ajax({
			type:"post",
			data:{ 
				page:$("#page").val()
			},
			url:"{:url('index/member/yuelist')}",
			success:function(data){	 
				var list=data.list; 
				var html=""; 
				if(list != ''){ 
					for(var i=0;i<list.length;i++){
						var log=list[i]; 
						html+='<li class="less clearfix">'
						       +"<div class='left'>"
						       +"<p class='list_nam'>"+log.message+"</p>"
						       +"<p class='list_time'>"+log.add_time+"</p>"
						       +"</div>"
						       +"<div class='right' style='color: #008800;'>"+log.balance+"</div>"
				    		   +'</li>'
					}
				}else{
					html="<img src='__PUBLIC__/static/wx/images/ddnone.jpg' style='margin-top: 120px;'>";
				}
				$(".record_list2").html(html);
				
			}
		}); 
	});
 
	
	$(window).scroll(function(){
		var scrollTop = $(window).scrollTop();       //滚动条高度
		var bodyheight = $(document).height();         //文档的高度
		var windowheight = window.innerHeight;	//$(window).height();              //当前窗体的高度
		if((bodyheight - windowheight - scrollTop) == 0){
			var index = layer.load(1, {shade: false,time: 1.5 * 1000});
			$.ajax({
			type:"post",
			data:{ 
				page:parseFloat($("#page").val())+1
			},
			url:"{:url('index/member/yuelist')}",
			success:function(data){	
				layer.close(index);
				var list=data.list;
				var html="";
				if(list){ 
					$("#page").val(parseFloat($("#page").val())+1);
						for(var i=0;i<list.length;i++){
							var log=list[i]; 
							html+='<li class="less clearfix">'
							       +"<div class='left'>"
							       +"<p class='list_nam'>"+log.message+"</p>"
							       +"<p class='list_time'>"+log.add_time+"</p>"
							       +"</div>"
							       +"<div class='right' style='color: #008800;'>"+log.balance+"</div>"
					    		   +'</li>'
						}
				}else{
					html="已经到最后";
				}
				$(".record_list2").append(html);
				
			}
		});
		
		}				
	})
</script>